Parameterized Duplication in Strings: Algorithms and an Application to Software Maintenance

نویسنده

  • Brenda S. Baker
چکیده

As an aid in software maintenance, it would be useful to be able to track down duplication in large software systems efficiently. Duplication in code is often in the form of sections of code that are the same except for a systematic change of parameters such as identifiers and constants. To model such parameterized duplication in code, this paper introduces the notions of parameterized strings and parameterized matches of parameterized strings. A data structure called a parameterized suffix tree is defined to aid in searching for parameterized matches. For fixed alphabets, algorithms are given to construct a parameterized suffix tree in linear time and to find all maximal parameterized matches over a threshold length in a parameterized p-string in time linear in the size of the input plus the number of matches reported. The algorithms have been implemented and experimental results show that they perform well on C code. keywords: string matching, pattern matching, duplication AMS subject classifications: 68Q25, 68Q20, 68R15 March 23, 1993; Revised Nov 17, 1995 _ ____________ *Some of the results in this paper were presented at the 25th Annual ACM Symposium on Theory of Computing, May, 1993. Parameterized Duplication in Strings: Algorithms and an Application to Software Maintenance*

برای دانلود رایگان متن کامل این مقاله و بیش از 32 میلیون مقاله دیگر ابتدا ثبت نام کنید

ثبت نام

اگر عضو سایت هستید لطفا وارد حساب کاربری خود شوید

منابع مشابه

Parameterized Matching

Two equal length strings s and s, over alphabets Σs and Σs′ , parameterize match if there exists a bijection π : Σs → Σs′ , such that π(s) = s, where π(s) is the renaming of each character of s via π. Parameterized matching is the problem of finding all parameterized matches of a pattern string p in a text t. It was introduced as a model for software duplication detection in software maintenanc...

متن کامل

Optimization of concrete structure mixture plan in marine environment using genetic algorithm

Today due to increasing development and importance of petroleum activities andmarine transport as well as due to the mining of seabed, building activities such as construction of docks, platforms and structures as those in coastal areas and oceans has increased significantly. Concrete strength as one of the most important necessary parameters for designing, depends on many factors such as mixtu...

متن کامل

Alphabet Dependence in Parameterized Matching

The classical pattern matching paradigm is that of seeking occurrences of one string in another, where both strings are drawn from an alphabet set Σ. A recently introduced model is that of parameterized pattern matching; the main motivation for this scheme lies in software maintenance where programs are considered “identical” even if variables names are different. Besides the fixed symbols from...

متن کامل

Modelling and solving the job shop scheduling Problem followed by an assembly stage considering maintenance operations and access restrictions to machines

This paper considers job shop scheduling problem followed by an assembly stage and Lot Streaming (LS). It is supposed here that a number of products have been ordered to be produced. Each product is assembled with a set of several parts. The production system includes two stages. The first stage is a job shop to produce parts. Each machine can process only one part at the same time. The second ...

متن کامل

Investigating the Role of Code Smells in Preventive Maintenance

The quest for improving the software quality has given rise to various studies which focus on the enhancement of the quality of software through various processes. Code smells, which are indicators of the software quality have not been put to an extensive study for as to determine their role in the prediction of defects in the software. This study aims to investigate the role of code smells in ...

متن کامل

ذخیره در منابع من


  با ذخیره ی این منبع در منابع من، دسترسی به آن را برای استفاده های بعدی آسان تر کنید

عنوان ژورنال:
  • SIAM J. Comput.

دوره 26  شماره 

صفحات  -

تاریخ انتشار 1997